<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <!--<link rel="stylesheet" href="css">-->
    <style>
        .tab_con{
            width:500px;
            height:350px;
            margin:50px auto 0;
        }
        .tab_btns{
            height:50px;
        }
        .tab_btns input{
            width:100px;
            height:50px;
            background:#ddd;
            border:0px;
            outline:none;
        }

        .tab_btns .active{
            background:gold;
        }

        .tab_cons{
            height:300px;
            background:gold;
        }

        .tab_cons div{
            height:300px;
            line-height:300px;
            text-align:center;
            display:none;
            font-size:30px;
        }

        .tab_cons .current{
            display:block;
        }
    </style>
    <script type="text/javascript" src="vue/vue.min.js"></script>

</head>
<body>
<div class="tab_con">
    <div class="tab_btns">
        <input type="button" value="按钮一" :class="[(num==0)?'active':'']"
               @click="num=0" @mouseover="num=0">
        <input type="button" value="按钮二" :class="[(num==1)?'active':'']"
               @click="num=1" @mouseover="num=1">
        <input type="button" value="按钮三" :class="[num==2?'active':'']"
               @click="num=2" @mouseover="num=2"></div>
    <div class="tab_cons">
        <div :class="[(num==0)?'current':'']">按钮一的内容</div>
        <div :class="[(num==1)?'current':'']">按钮二的内容</div>
        <div :class="[(num==2)?'current':'']">按钮三的内容</div>
    </div>
</div>

</body>
<script type="text/javascript">
    var vm = new Vue({
        el:".tab_con",
        data:{
            num:0
        }
    })
</script>
</html>